<?php
	$val['item_group'] = '';
?>
<form action="/adminarea/addmenuitem" method="post" enctype="multipart/form-data" id="validation" >
	<input type="hidden" id="id_restaurant" name="id_restaurant" value="<?php echo $this->idRestaurant; ?>" />

	<div class="hdr">Menu Item Information</div>
		<div class="cleft">
<p>
			<div>
				<em class="required">*</em>
				<label for="name">Name</label>
				<input type="text" value="<?php  if (isset($val['name'])) echo $val['name'];?>" name="name" id="name" maxlength="255" tabindex="1" />
			</div>
			<?php if(isset($this->aError['name'])) { foreach($this->aError['name'] as $ErrName => $ErrDescr) { ?>
				<div class="error_msg"><?php echo $ErrDescr; ?></div>
			<?php } } ?>

			<div>
				<em class="required">*</em>
				<label for="description">Description</label>
				<textarea cols="60" rows="10" name="description" id="description" tabindex="2" /><?php  if (isset($val['description'])) echo $val['description'];?></textarea>
			</div>
			<?php if(isset($this->aError['description'])) { foreach($this->aError['description'] as $ErrName => $ErrDescr) { ?>
				<div class="error_msg"><?php echo $ErrDescr; ?></div>
			<?php } } ?>

			<div class="grid_8">
				<div id="group_group">
					<em class="required">*</em>
					<label for="item_group">Group</label>
					<select name="item_group"  tabindex="3" >
						<?php
							foreach ($this->allMenuGroups as $menuGroup)
							{
						?>
							<option value="<?php echo $menuGroup->id; ?>" <?php echo  ($val['item_group'] == $menuGroup->id) ? 'selected' : ''; ?>><?php echo $menuGroup->name; ?></option>
						<?php
							}
						?>
							<option value="Add new" id="add_new_group">Add new</option>
					</select>
					<div id="i_new_group_name"></div>
				</div>				
			</div>
			
			<div class="clear"></div>

			<div>
				<div class="grid_2 alpha">
					<em class="required">*</em>
					<label for="price_type">Price</label>
					<div>
						<input type="radio" value="single" name="price_type" id="single_price" tabindex="4" />
						<label for="single_price">Single price</label>
					</div>

					<div>
						<input type="radio" value="group" name="price_type" id="group_price" tabindex="5" />
						<label for="group_price">Group price</label>
					</div>
				</div>

				<div id="price_place" class="grid_13">
				</div>
			</div>
	<div class="clear"></div>

			<div class="grid_15">
					<label for="name">OptionS</label>
				<div id="click_new_group_name">
				 	<a href="javascript:void(0);" class="sexybutton sexysimple sexymagenta add_option_group" ><span class="add">Add new option group</span></a>
				</div>

				<div class="group_name_div">
				</div>
			</div>

</p>
	<div class="clear"></div>


<p>
	<div>
			<input class="sexybutton sexysimple sexymagenta" type="submit" value="Save" /></input>
	</div>
</p>
		</div>
</form>


	<div id="price_place_div_group">
				<div>
				 	<a href="javascript:void(0);" id="apg_1" class="sexybutton sexysimple sexymagenta add_price_group" ><span class="add">Add new price group</span></a>
				</div>

				<div id="price_group_div">
				</div>

	</div>
	
	<div id="price_place_div_single">
		$<input type="text" name="single_price" id="single_price_input"  class="price_input" />
	</div>

		<div id="upload_image">
			<em class="required">*</em>
			Image <input type="file" name="image" id="image" maxlength="255" tabindex="3" />
		</div>
	